uboot-envtools: reorganize the initialization scripts
authorShiji Yang <[email protected]>
Fri, 5 Dec 2025 13:19:05 +0000 (21:19 +0800)
committerHauke Mehrtens <[email protected]>
Mon, 8 Dec 2025 23:34:22 +0000 (00:34 +0100)
Reorder device names alphabetically and group together the same configs.

Signed-off-by: Shiji Yang <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/21052
Signed-off-by: Hauke Mehrtens <[email protected]>
package/boot/uboot-tools/uboot-envtools/files/lantiq
package/boot/uboot-tools/uboot-envtools/files/mediatek_filogic
package/boot/uboot-tools/uboot-envtools/files/mediatek_mt7622
package/boot/uboot-tools/uboot-envtools/files/qualcommax_ipq807x
package/boot/uboot-tools/uboot-envtools/files/ramips
package/boot/uboot-tools/uboot-envtools/files/realtek

index 4e6fb48b76e44b8afd2e46eeca9b8150dd0943f5..5fe48d3112bfe57f0c60855025f4288bc00a270b 100644 (file)
@@ -12,15 +12,13 @@ touch /etc/config/ubootenv
 board=$(board_name)
 
 case "$board" in
-bt,homehub-v2b)
+bt,homehub-v2b|\
+siemens,gigaset-sx76x)
        ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" "1"
        ;;
 bt,homehub-v3a)
        ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x4000" "0x4000" "1"
        ;;
-siemens,gigaset-sx76x)
-       ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" "1"
-       ;;
 zyxel,p-2812hnu-f1)
        ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x2000" "0x20000" "1"
        ;;
index 9e52025fdbff7f031928c3b4bb30808372121b82..b7dc08ded2e33435dcec07298d15f7f8de1cfda8 100644 (file)
@@ -37,6 +37,7 @@ netcore,n60|\
 netcore,n60-pro|\
 netis,nx31|\
 nokia,ea0326gmp|\
+openwrt,one|\
 qihoo,360t7|\
 routerich,ax3000-ubootmod|\
 snr,snr-cpe-ax2|\
@@ -61,6 +62,15 @@ huasifei,wh3000|\
 nradio,c8-668gl)
        ubootenv_add_mmc "u-boot-env" "" "0x0" "0x80000"
        ;;
+asiarf,ap7986-003|\
+cetron,ct3003|\
+comfast,cf-wr632ax|\
+edgecore,eap111|\
+netgear,wax220|\
+zbtlink,zbt-z8102ax|\
+zbtlink,zbt-z8103ax)
+       ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
+       ;;
 asus,rt-ax59u)
        ubootenv_add_uci_config "/dev/mtd0" "0x100000" "0x20000" "0x20000"
        ;;
@@ -100,15 +110,6 @@ comfast,cf-e393ax|\
 iptime,ax3000m)
        ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x80000"
        ;;
-asiarf,ap7986-003|\
-cetron,ct3003|\
-comfast,cf-wr632ax|\
-edgecore,eap111|\
-netgear,wax220|\
-zbtlink,zbt-z8102ax|\
-zbtlink,zbt-z8103ax)
-       ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
-       ;;
 dlink,aquila-pro-ai-m30-a1|\
 dlink,aquila-pro-ai-m60-a1)
        ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000"
@@ -123,14 +124,14 @@ openembed,som7981)
        ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x80000"
        ubootenv_add_uci_sys_config "/dev/mtd3" "0x0" "0x100000" "0x100000"
        ;;
-openwrt,one)
-       ubootenv_add_ubi_default
-       ;;
 smartrg,sdg-8733|\
 smartrg,sdg-8733a|\
 smartrg,sdg-8734)
        ubootenv_add_mmc "u-boot-env" "mmcblk0" "0x0" "0x8000" "0x8000"
        ;;
+teltonika,rutc50)
+       ubootenv_add_mtd "u-boot-env" "0x0" "0x10000" "0x10000"
+       ;;
 tplink,archer-ax80-v1|\
 tplink,be450)
        ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000" "8"
@@ -138,9 +139,6 @@ tplink,be450)
 ubnt,unifi-6-plus)
        ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x10000"
        ;;
-teltonika,rutc50)
-       ubootenv_add_mtd "u-boot-env" "0x0" "0x10000" "0x10000"
-       ;;
 xiaomi,mi-router-ax3000t|\
 xiaomi,mi-router-wr30u-stock|\
 xiaomi,redmi-router-ax6000-stock)
index 8a053e1cad54253ca0eb1caa45fe219d8e60baa2..51d620fdb04c05a06ebf22c574edebcd02322eb0 100644 (file)
@@ -20,10 +20,6 @@ case "$board" in
 asiarf,ap7622-wh1)
        ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x1000" "0x10000"
        ;;
-dlink,eagle-pro-ai-m32-a1|\
-dlink,eagle-pro-ai-r32-a1)
-       ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x2000" "0x2000"
-       ;;
 bananapi,bpi-r64|\
 linksys,e8450-ubi)
        . /lib/upgrade/fit.sh
@@ -41,6 +37,10 @@ linksys,e8450-ubi)
 buffalo,wsr-2533dhp2)
        ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x1000" "0x20000"
        ;;
+dlink,eagle-pro-ai-m32-a1|\
+dlink,eagle-pro-ai-r32-a1)
+       ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x2000" "0x2000"
+       ;;
 ruijie,rg-ew3200gx-pro)
        ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x20000" "0x20000"
        ;;
index c022531a06f8117d93b516c66ebff912de47aac0..46a7111c1be6511bff414ea3003075a675ea5a40 100644 (file)
@@ -15,6 +15,10 @@ zyxel,nbg7815|\
 zyxel,nwa210ax)
        ubootenv_add_mtd "0:appsblenv" "0x0" "0x10000" "0x10000"
        ;;
+asus,rt-ax89x|\
+qnap,301w)
+       ubootenv_add_mtd "0:appsblenv" "0x0" "0x20000" "0x20000"
+       ;;
 dynalink,dl-wrx36|\
 netgear,rax120v2|\
 netgear,sxr80|\
@@ -42,19 +46,15 @@ linksys,mx8500)
 linksys,mx4300)
        ubootenv_add_mtd "u_env" "0x0" "0x40000" "0x40000"
        ;;
+prpl,haze)
+       ubootenv_add_mmc "0:APPSBLENV" "" "0x0" "0x40000" "0x400" "0x100"
+       ;;
 redmi,ax6|\
 xiaomi,ax3600|\
 xiaomi,ax9000)
        ubootenv_add_mtd "0:appsblenv" "0x0" "0x10000" "0x20000"
        ubootenv_add_sys_mtd "bdata" "0x0" "0x10000" "0x20000"
        ;;
-prpl,haze)
-       ubootenv_add_mmc "0:APPSBLENV" "" "0x0" "0x40000" "0x400" "0x100"
-       ;;
-asus,rt-ax89x|\
-qnap,301w)
-       ubootenv_add_mtd "0:appsblenv" "0x0" "0x20000" "0x20000"
-       ;;
 spectrum,sax1v1k)
        ubootenv_add_mmc "0:APPSBLENV" "" "0x0" "0x40000" "0x40000" "1"
        ;;
index 4b080b6baacbb1c81e7d7e8dbded9cc3ef81121d..b5f7858f133bfc6230d875e4cb97071902ff1caa 100644 (file)
@@ -36,13 +36,44 @@ plasmacloud,pax1800-lite|\
 yuncore,ax820)
        ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
        ;;
+ampedwireless,ally-00x19k|\
+ampedwireless,ally-r1900k)
+       ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000" "4"
+       ;;
 arcadyan,we420223-99|\
 dlink,dir-806a-b1)
        ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x1000" "0x1000"
        ;;
-ampedwireless,ally-00x19k|\
-ampedwireless,ally-r1900k)
-       ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000" "4"
+asus,rt-ax53u|\
+asus,rt-ax54|\
+asus,4g-ax56|\
+belkin,rt1800|\
+elecom,wrc-x1800gs|\
+h3c,tx1800-plus|\
+h3c,tx1801-plus|\
+h3c,tx1806|\
+iptime,ax2002m|\
+iptime,ax2004m|\
+jcg,q20|\
+linksys,e7350|\
+netgear,eax12|\
+netgear,wax202|\
+netis,n6|\
+zyxel,wsm20)
+       ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
+       ;;
+beeline,smartbox-flash|\
+iptime,t5004|\
+linksys,ea6350-v4|\
+linksys,ea7300-v1|\
+linksys,ea7300-v2|\
+linksys,ea7500-v2|\
+linksys,ea8100-v1|\
+linksys,ea8100-v2|\
+mts,wg430223|\
+ubnt,edgerouter-x|\
+ubnt,edgerouter-x-sfp)
+       ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
        ;;
 beeline,smartbox-giga|\
 beeline,smartbox-turbo|\
@@ -57,6 +88,12 @@ tplink,ec330-g5u-v1|\
 wifire,s1500-nbn)
        ubootenv_add_mtd "u-boot-env" "0x0" "0x1000" "0x20000"
        ;;
+bolt,arion|\
+xiaomi,mi-router-cr6606|\
+xiaomi,mi-router-cr6608|\
+xiaomi,mi-router-cr6609)
+       ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
+       ;;
 buffalo,wsr-1166dhp|\
 buffalo,wsr-600dhp|\
 kroks,kndrt31r16|\
@@ -70,23 +107,10 @@ zbtlink,zbt-wg2626|\
 zte,mf283plus)
        ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
        ;;
-asus,rt-ax53u|\
-asus,rt-ax54|\
-asus,4g-ax56|\
-belkin,rt1800|\
-elecom,wrc-x1800gs|\
-h3c,tx1800-plus|\
-h3c,tx1801-plus|\
-h3c,tx1806|\
-iptime,ax2002m|\
-iptime,ax2004m|\
-jcg,q20|\
-linksys,e7350|\
-netgear,eax12|\
-netgear,wax202|\
-netis,n6|\
-zyxel,wsm20)
-       ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
+dna,valokuitu-plus-ex400|\
+genexis,pulse-ex400)
+       ubootenv_add_uci_config "/dev/ubi0_0" "0x0" "0x1f000" "0x1f000" "1"
+       ubootenv_add_uci_config "/dev/ubi0_1" "0x0" "0x1f000" "0x1f000" "1"
        ;;
 haier,har-20s2u1|\
 sim,simax1800t|\
@@ -98,27 +122,22 @@ hootoo,ht-tm05|\
 ravpower,rp-wd03)
        ubootenv_add_mtd "u-boot-env" "0x4000" "0x1000" "0x1000"
        ;;
-beeline,smartbox-flash|\
-iptime,t5004|\
-linksys,ea6350-v4|\
-linksys,ea7300-v1|\
-linksys,ea7300-v2|\
-linksys,ea7500-v2|\
-linksys,ea8100-v1|\
-linksys,ea8100-v2|\
-mts,wg430223|\
-ubnt,edgerouter-x|\
-ubnt,edgerouter-x-sfp)
-       ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
+netgear,wax214v2)
+       ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
+       ubootenv_add_uci_sys_config "/dev/mtd1" "0x20000" "0x8000" "0x20000"
        ;;
 snr,snr-cpe-me1|\
 snr,snr-cpe-me2-sfp|\
 snr,cpe-w4n-mt)
        ubootenv_add_mtd "uboot-env" "0x0" "0x1000" "0x1000"
        ;;
-xiaomi,miwifi-mini)
-       ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
-       ubootenv_add_uci_sys_config "/dev/mtd9" "0x0" "0x4000" "0x10000"
+xiaomi,mi-router-3-pro|\
+xiaomi,mi-router-3g|\
+xiaomi,mi-router-4|\
+xiaomi,mi-router-ac2100|\
+xiaomi,redmi-router-ac2100)
+       ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
+       ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x20000"
        ;;
 xiaomi,mi-router-3g-v2|\
 xiaomi,mi-router-4a-gigabit|\
@@ -126,13 +145,9 @@ xiaomi,miwifi-3c)
        ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
        ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x10000"
        ;;
-xiaomi,mi-router-3g|\
-xiaomi,mi-router-3-pro|\
-xiaomi,mi-router-4|\
-xiaomi,mi-router-ac2100|\
-xiaomi,redmi-router-ac2100)
-       ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
-       ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x20000"
+xiaomi,miwifi-mini)
+       ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
+       ubootenv_add_uci_sys_config "/dev/mtd9" "0x0" "0x4000" "0x10000"
        ;;
 zyxel,lte3301-plus)
        ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x80000"
@@ -142,21 +157,6 @@ zyxel,lte7490-m904|\
 zyxel,nr7101)
        ubootenv_add_mtd "Config" "0x0" "0x1000" "0x80000"
        ;;
-bolt,arion|\
-xiaomi,mi-router-cr6606|\
-xiaomi,mi-router-cr6608|\
-xiaomi,mi-router-cr6609)
-       ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
-       ;;
-dna,valokuitu-plus-ex400|\
-genexis,pulse-ex400)
-       ubootenv_add_uci_config "/dev/ubi0_0" "0x0" "0x1f000" "0x1f000" "1"
-       ubootenv_add_uci_config "/dev/ubi0_1" "0x0" "0x1f000" "0x1f000" "1"
-       ;;
-netgear,wax214v2)
-       ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
-       ubootenv_add_uci_sys_config "/dev/mtd1" "0x20000" "0x8000" "0x20000"
-       ;;
 esac
 
 config_load ubootenv
index 0a03792f8a2ebd0fc6597229d02c6fa4227da7ea..ba980363bac91cf32de472fbec3df02c20690290 100644 (file)
@@ -31,15 +31,15 @@ zyxel,gs1900-48-a1)
        ubootenv_add_mtd "u-boot-env" "0x0" "0x400" "0x10000"
        ubootenv_add_sys_mtd "u-boot-env2" "0x0" "0x1000" "0x10000"
        ;;
+iodata,bsh-g24mb)
+       ubootenv_add_mtd "u-boot-env" "0x0" "0x10000" "0x10000"
+       ubootenv_add_sys_mtd "u-boot-env2" "0x0" "0x3800" "0x10000"
+       ;;
 tplink,sg2008p-v1|\
 tplink,sg2210p-v3|\
 tplink,sg2452p-v4)
        ubootenv_add_mtd "u-boot-env" "0x0" "0x20000" "0x10000"
        ;;
-iodata,bsh-g24mb)
-       ubootenv_add_mtd "u-boot-env" "0x0" "0x10000" "0x10000"
-       ubootenv_add_sys_mtd "u-boot-env2" "0x0" "0x3800" "0x10000"
-       ;;
 *)
        ubootenv_add_mtd "u-boot-env" "0x0" "0x10000" "0x10000"
        ubootenv_add_sys_mtd "u-boot-env2" "0x0" "0x1000" "0x10000"